home *** CD-ROM | disk | FTP | other *** search
- #pragma load "ram disk:DumpHeaders"
-
- /*
- #include <Types.h>
- #include <memory.h>
- #include <Packages.h>
- #include <Errors.h>
- #include <quickdraw.h>
- #include <fonts.h>
- #include <dialogs.h>
- #include <windows.h>
- #include <menus.h>
- #include <events.h>
- #include <OSEvents.h>
- #include <Desk.h>
- #include <diskinit.h>
- #include <OSUtils.h>
- #include <resources.h>
- #include <toolutils.h>
- #include <AppleEvents.h>
- #include <EPPC.h>
- #include <GestaltEqu.h>
- #include <PPCToolbox.h>
- #include <Processes.h>
- #include <Balloons.h>
- #include <aliases.h>
- */
- /* windowControl is the structure attached to every window I create (in the refCon */
- /* field) that contains all the information I need to know about the window. */
- /* data, procedure pointers for controlling, and anything else gets put in this */
- /* struct. That makes my windows autonomous */
- struct windowControl {
- unsigned long windowID; /* master ID number */
- ProcPtr drawMe; /* content drawing procedure pointer */
- ProcPtr clickMe; /* content click routine */
- ProcPtr closeMe; /* document close procedure pointer */
- ProcPtr sizeMe; /* size procedure */
- AliasHandle fileAliasHandle; /* alias for this document */
- Boolean windowDirty;
- Handle generalData; /* cast to whatever you need as you need it */
- };
- typedef struct windowControl windowControl, *windowCPtr, **windowCHandle;
-
- struct AEinstalls {
- AEEventClass theClass;
- AEEventID theEvent;
- EventHandlerProcPtr theProc;
- };
- typedef struct AEinstalls AEinstalls;
-
- enum {kDocWindowResID = 128,kMyDocumentWindow = 1000};
- /* menu enums */
- enum {kMBarID = 128};
- enum {kAppleMenu = 128,kFileMenu,kEditMenu,kToolsMenu};
-
- /* file menu enums */
- enum {kNewItem = 1,kOpenItem,kCloseItem,kSaveItem,kSaveAsItem,kFileBlank1,kPageSetupItem,kPrintItem,kFileBlank2,kQuitItem};
-
- /* general purpose enums */
- enum {kResumeMask=1,kSampHelp=129,kAboutBox=128,kHelpString=128,kBadSystem=130,kNoneOfThatType=132};
- enum {kResTypeDialog = 131,kResTypeEditLine=4};
- enum {kTestMenuChooseType = 1,kTestMenuDivider};
-
- enum {kMinHeight = 200};
- enum {kGenStrings = 128,kUnnamedString=1};
-
- enum {
- kEnterKey = 0x03,
- kTabKey = 9,
- kReturnKey = 0x0D,
- kBackSpace = 8,
- kEscKey = 0x1B,
- kLeftArrow = 0x1C,
- kRightArrow,
- kUpArrow,
- kDownArrow,
- kDeleteKey = 0x7F
- };
-
-
-
-
-
- /* These are the new Dialog Manager calls described in Tech note #304 */
- /* ONLY used if System 7 or later, of course */
- pascal OSErr GetStdFilterProc(ModalFilterProcPtr *theProc) =
- {
- 0x303C, 0x0203, 0xAA68
- };
-
-
-
-
- /* Indicates to the dialog manager which item is default. Will then alias the return key */
- /* to this item, and also bold border it for you (yaaaaa!) */
- pascal OSErr SetDialogDefaultItem(DialogPtr theDialog, short newItem)
- =
- {
- 0x303C, 0x0304, 0xAA68
- };
-
-
-
-
- /* Indicates which item should be aliased to escape or Command - . */
- pascal OSErr SetDialogCancelItem(DialogPtr theDialog, short newItem)
- =
- {
- 0x303C, 0x0305, 0xAA68
- };
-
-
-
-
- /* Tells the dialog manager that there is an edit line in this dialog, and */
- /* it should track and change to an I-Beam cursor when over the edit line */
- pascal OSErr SetDialogTracksCursor(DialogPtr theDialog, Boolean tracks) =
- {
- 0x303C, 0x0306, 0xAA68
- };
-
-